<template>
  <div>
    <h1>附近</h1>
    <button @click="show">{{ city }}</button>
    <div class="list" v-show="isShow">
      <div v-for="(item,index) in list" :key="index" @click="aaa(item)">
        <div>{{ item }}</div>
      </div>
    </div>
    <van-progress class="wid" :percentage="50" :show-pivot="false" stroke-width=".5rem"/>
    <div class="mb"></div>
    <vant-tabbar></vant-tabbar>

  </div>
</template>

<script>

import Vue from 'vue';
import {Progress} from 'vant';
import VantTabbar from "../components/vantTabbar/vantTabbar";

Vue.use(Progress);
export default {
  name: "near",
  components: {VantTabbar},
  data() {
    return {
      isShow: false,
      list: ["长沙", "武汉", "北京", "广州", "深圳",],
      city: "长沙",
      false: false
    }
  },
  methods: {
    aaa(item) {
      console.log(item);
      this.city = item;
      this.isShow = false;
    },
    show() {
      this.isShow = !this.isShow;
    }
  }
}
</script>

<style scoped>
.aaa {
  background-color: #FF6A51;
  width: 10rem;
}

.list {
  text-align: center;
  background-color: #d0d0d0;
  width: 2rem;
  font-size: .5rem;
}

.wid {
  width: 20%;
}

.mb {
  margin-bottom: 1.3rem;
}
</style>